package com.yuanfeng.business.controller;


import com.yuanfeng.business.dto.ManageShopSelfCatAddDTO;
import com.yuanfeng.business.dto.WebShopGoodsListQueryDTO;
import com.yuanfeng.commoms.util.ResponseResult;
import com.yuanfeng.commoms.vo.base.DealerApplyInfoVO;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName ShopGoodsCatController
 * @Description 店铺商品分类关系表
 * @Author cyp
 * @Date 2023-06-14 15:29:04
 * @Version 1.0
 **/
@RestController
@RequestMapping("shopGoods")
public class ShopGoodsCatController extends BaseController {

    /**
     * 店铺商品列表
     *
     * @param param
     * @return
     */
    @PostMapping("/listFilter")
    public ResponseResult queryShopGoodsList(@RequestBody WebShopGoodsListQueryDTO param) {

        return shopGoodsCatService.queryShopGoodsList(param);
    }

    /**
     * 店铺自定义的分类
     *
     * @param param
     * @return
     */
    @PostMapping("/selfCat/add")
    public ResponseResult addShopSelfCat(@RequestBody ManageShopSelfCatAddDTO param) {
        return shopGoodsCatService.addShopSelfCat(param);
    }


    /**
     * 商家申请供应商店铺分类页数据获取
     * @param dealerApply
     * @return
     */
    @RequestMapping("/queryDealerClassInfo")
    public ResponseResult queryDealerClassInfo(@RequestBody DealerApplyInfoVO dealerApply){
        ResponseResult result=shopGoodsCatService.queryDealerClassInfo(dealerApply);
        return result;
    }
}
